package com.keke.service.user;

import com.keke.pojo.User;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

public interface UserService {
    //用户登录
    public User login(String userCode,String password);

    //根据用户id修改密码
    public boolean updatePwd(int id, String pwd);

    //查询记录数
    public int getUserCount(String username ,int userRole);

    //根据条件查询用户列表
    public List<User> getUserList(String queryUserName,int queryUserRole,int currentPageNo,int pageSize);

    //添加用户
    public boolean add(User user);

    //删除用户
    public boolean deleteUserById(Integer delId);

    //根据id查询user
    public User getUserById(String id);

    //修改用户
    public int modify(User user);

    //获取编码是否存在
    public User getUserByUserCode(String userCode) throws SQLException;
}
